package com.yypinger.gxonline.view.basedata;

import org.vaadin.appfoundation.i18n.Lang;

import com.vaadin.terminal.ThemeResource;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
import com.vaadin.ui.TabSheet.SelectedTabChangeListener;
import com.yypinger.gxonline.GxOnlineApplication;

public class SystemManagerTabSheet extends VerticalLayout implements
		SelectedTabChangeListener {

	private static final long serialVersionUID = -3961631348226127814L;

	private TabSheet t;    
	//会员管理
	private UserManagerView userManagerView;
	//基础数据管理
	private BaseDataView baseDataView;
	//衣物价格管理
	private ColthPriceView colthPriceView;
	//权限管理
	private SecurityView securityView;
	//系统管理
	private SystemView systemView;
	//日志管理
	private JournalView journalView;
	//数据管理
	private DataView dataView;
	
	public SystemManagerTabSheet(){
		buildTabs();
	}
	
	
	private void buildTabs(){
		
		setSizeFull();
		userManagerView = new UserManagerView();
		baseDataView = new BaseDataView();
		colthPriceView = new ColthPriceView();
		securityView = new SecurityView();
		systemView = new SystemView();
		journalView = new JournalView(); 
		dataView = new DataView();
		
		t =  new TabSheet();
		t.setSizeFull();
		t.addTab(userManagerView, Lang.getMessage("system.userMangerTabLabel"),new ThemeResource("../"+GxOnlineApplication.GXONLINE_THEME_NAME+"/icons/medium/blue24_031.gif"));
		t.addTab(baseDataView, Lang.getMessage("system.baseDataTabLabel"), new ThemeResource("../"+GxOnlineApplication.GXONLINE_THEME_NAME+"/icons/medium/blue24_044.gif"));
		t.addTab(colthPriceView, Lang.getMessage("system.colthPriceTabLabel"), new ThemeResource("../"+GxOnlineApplication.GXONLINE_THEME_NAME+"/icons/medium/blue24_013.gif"));
		t.addTab(securityView, Lang.getMessage("system.securityTabLabel"), new ThemeResource("../"+GxOnlineApplication.GXONLINE_THEME_NAME+"/icons/medium/blue24_074.gif"));
		t.addTab(systemView, Lang.getMessage("system.systemTabLabel"), new ThemeResource("../"+GxOnlineApplication.GXONLINE_THEME_NAME+"/icons/medium/blue24_015.gif"));
		t.addTab(journalView, Lang.getMessage("system.jounalTabLabel"), new ThemeResource("../"+GxOnlineApplication.GXONLINE_THEME_NAME+"/icons/medium/blue24_006.gif"));
		t.addTab(dataView, Lang.getMessage("system.jounalTabLabel"), new ThemeResource("../"+GxOnlineApplication.GXONLINE_THEME_NAME+"/icons/medium/blue24_004.gif"));
		
		addComponent(t);
	}
	
	@Override
	public void selectedTabChange(SelectedTabChangeEvent event) {
		
		
	}

}
